"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const vue_1 = require("vue");
const core_1 = require("@vueuse/core");
const userId = (0, core_1.useSessionStorage)('qa_user_id', '');
// 初始化时生成用户ID
(0, vue_1.onMounted)(() => {
    if (!userId.value) {
        userId.value = Date.now().toString(36) + Math.random().toString(36).substring(2);
    }
});
const fileApi_1 = require("../api/fileApi");
const fetch_event_source_1 = require("@microsoft/fetch-event-source");
const icons_vue_1 = require("@element-plus/icons-vue");
const element_plus_1 = require("element-plus");
// 消息相关
const messages = (0, vue_1.ref)([
    { role: 'assistant', content: '您好！我是您的智能问答助手，请问有什么可以帮您？' },
]);
const inputText = (0, vue_1.ref)('');
const isLoading = (0, vue_1.ref)(false);
// 历史记录相关
const historyList = (0, vue_1.ref)([]);
const selectedHistoryId = (0, vue_1.ref)(null);
const editDialogVisible = (0, vue_1.ref)(false);
const editingHistory = (0, vue_1.ref)(null);
const newTitle = (0, vue_1.ref)('');
const isLoadingHistory = (0, vue_1.ref)(false);
const refreshHistory = () => __awaiter(void 0, void 0, void 0, function* () {
    selectedHistoryId.value = null;
    messages.value = [
        { role: 'assistant', content: '您好！我是您的智能问答助手，请问有什么可以帮您？' },
    ];
    yield fetchHistory();
});
const fetchHistory = () => __awaiter(void 0, void 0, void 0, function* () {
    isLoadingHistory.value = true;
    try {
        const res = yield (0, fileApi_1.getHistoryPage)({ current: 1, size: 10 });
        if (res.data.code === 200 && res.data.success) {
            historyList.value = res.data.data.records.map((item) => ({
                id: item.historyId,
                title: item.title,
                createAt: item.createAt,
            }));
        }
    }
    catch (error) {
        console.error('获取历史记录失败:', error);
    }
    finally {
        isLoadingHistory.value = false;
    }
});
const loadHistory = (history) => __awaiter(void 0, void 0, void 0, function* () {
    selectedHistoryId.value = history.id;
    try {
        const res = yield (0, fileApi_1.getHistoryConversationData)({
            userId: userId.value, // 需要从用户状态或登录信息中获取
            conversationId: history.id,
        });
        if (res.data.code === 200 && res.data.success) {
            messages.value = res.data.data
                .map((item) => [
                { role: 'user', content: item.question },
                { role: 'assistant', content: item.answer },
            ])
                .flat();
        }
    }
    catch (error) {
        console.error('加载历史会话失败:', error);
        messages.value = [{ role: 'assistant', content: `加载"${history.title}"的对话历史失败` }];
    }
});
const formatDate = (dateString) => {
    const date = new Date(dateString);
    return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`;
};
const showEditDialog = (history) => {
    editingHistory.value = history;
    newTitle.value = history.title;
    editDialogVisible.value = true;
};
const showDeleteConfirm = (history) => {
    element_plus_1.ElMessageBox.confirm('确定要删除这条历史记录吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
        deleteHistory(history.id);
    })
        .catch(() => { });
};
const deleteHistory = (id) => __awaiter(void 0, void 0, void 0, function* () {
    try {
        const res = yield (0, fileApi_1.removeHistory)(id);
        if (res.data.code === 200 && res.data.success) {
            element_plus_1.ElMessage.success('删除成功');
            fetchHistory();
        }
    }
    catch (error) {
        console.error('删除历史记录失败:', error);
        element_plus_1.ElMessage.error('删除失败');
    }
});
const confirmEditTitle = () => __awaiter(void 0, void 0, void 0, function* () {
    if (!editingHistory.value || !newTitle.value.trim())
        return;
    try {
        const res = yield (0, fileApi_1.updateHistoryTitle)({
            historyId: editingHistory.value.id,
            title: newTitle.value,
        });
        if (res.data.code === 200 && res.data.success) {
            editingHistory.value.title = newTitle.value;
            editDialogVisible.value = false;
        }
    }
    catch (error) {
        console.error('修改标题失败:', error);
    }
});
const sendMessage = () => __awaiter(void 0, void 0, void 0, function* () {
    if (!inputText.value.trim())
        return;
    // 保存当前输入值
    const currentInput = inputText.value;
    const userMessage = {
        role: 'user',
        content: currentInput,
    };
    messages.value.push(userMessage);
    let assistantMessageIndex = messages.value.push({
        role: 'assistant',
        content: '',
    }) - 1;
    // 滚动到输入区域
    const scrollToBottom = () => {
        const chatArea = document.querySelector('.chat-area');
        if (chatArea) {
            chatArea.scrollTop = chatArea.scrollHeight;
        }
    };
    (0, vue_1.nextTick)(scrollToBottom);
    isLoading.value = true;
    document.querySelector('.el-input__inner').disabled = true;
    inputText.value = '';
    const ctrl = new AbortController();
    (0, fetch_event_source_1.fetchEventSource)('/api/llm/chat', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            question: currentInput,
            userId: userId.value,
            historyId: selectedHistoryId.value,
        }),
        signal: ctrl.signal,
        onmessage: (event) => {
            try {
                const jsonData = JSON.parse(event.data);
                selectedHistoryId.value = jsonData.historyId;
                if (assistantMessageIndex === -1) {
                    messages.value.push({
                        role: 'assistant',
                        content: jsonData.content,
                    });
                    assistantMessageIndex = messages.value.length - 1;
                }
                else {
                    messages.value[assistantMessageIndex].content += jsonData.content;
                }
                scrollToBottom();
            }
            catch (e) {
                console.error('解析消息失败:', e);
            }
        },
        onerror: (err) => {
            element_plus_1.ElMessage.error(err.message);
            isLoading.value = false;
            document.querySelector('.el-input__inner').disabled = false;
            document.querySelector('.el-button').disabled = false;
            assistantMessageIndex = -1;
            ctrl.abort();
        },
        onclose: () => {
            inputText.value = '';
            isLoading.value = false;
            document.querySelector('.el-input__inner').disabled = false;
            document.querySelector('.el-button').disabled = false;
            fetchHistory();
            assistantMessageIndex = -1;
            ctrl.abort();
        },
    });
});
// 初始化时加载历史记录
fetchHistory();
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
const __VLS_ctx = {};
let __VLS_components;
let __VLS_directives;
/** @type {__VLS_StyleScopedClasses['sidebar-header']} */ ;
/** @type {__VLS_StyleScopedClasses['history-item']} */ ;
/** @type {__VLS_StyleScopedClasses['history-item']} */ ;
/** @type {__VLS_StyleScopedClasses['message']} */ ;
/** @type {__VLS_StyleScopedClasses['message']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message']} */ ;
/** @type {__VLS_StyleScopedClasses['user']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['message']} */ ;
/** @type {__VLS_StyleScopedClasses['assistant']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['delete-icon']} */ ;
// CSS variable injection 
// CSS variable injection end 
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "qa-container" }));
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "main-layout" }));
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "history-sidebar" }));
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "sidebar-header" }));
__VLS_asFunctionalElement(__VLS_intrinsicElements.h3, __VLS_intrinsicElements.h3)({});
const __VLS_0 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0(Object.assign({ 'onClick': {} }, { type: "primary", size: "small", loading: (__VLS_ctx.isLoadingHistory) })));
const __VLS_2 = __VLS_1(Object.assign({ 'onClick': {} }, { type: "primary", size: "small", loading: (__VLS_ctx.isLoadingHistory) }), ...__VLS_functionalComponentArgsRest(__VLS_1));
let __VLS_4;
let __VLS_5;
let __VLS_6;
const __VLS_7 = {
    onClick: (__VLS_ctx.refreshHistory)
};
__VLS_3.slots.default;
var __VLS_3;
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "history-list" }));
for (const [item] of __VLS_getVForSourceType((__VLS_ctx.historyList))) {
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign(Object.assign(Object.assign({ onClick: (...[$event]) => {
            __VLS_ctx.loadHistory(item);
        } }, { key: (item.id) }), { class: "history-item" }), { class: ({ active: __VLS_ctx.selectedHistoryId === item.id }) }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "history-title" }));
    (item.title);
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "history-actions" }));
    const __VLS_8 = {}.ElIcon;
    /** @type {[typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, ]} */ ;
    // @ts-ignore
    const __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8(Object.assign({ 'onClick': {} }, { class: "edit-icon" })));
    const __VLS_10 = __VLS_9(Object.assign({ 'onClick': {} }, { class: "edit-icon" }), ...__VLS_functionalComponentArgsRest(__VLS_9));
    let __VLS_12;
    let __VLS_13;
    let __VLS_14;
    const __VLS_15 = {
        onClick: (...[$event]) => {
            __VLS_ctx.showEditDialog(item);
        }
    };
    __VLS_11.slots.default;
    const __VLS_16 = {}.Edit;
    /** @type {[typeof __VLS_components.Edit, ]} */ ;
    // @ts-ignore
    const __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16({}));
    const __VLS_18 = __VLS_17({}, ...__VLS_functionalComponentArgsRest(__VLS_17));
    var __VLS_11;
    const __VLS_20 = {}.ElIcon;
    /** @type {[typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, ]} */ ;
    // @ts-ignore
    const __VLS_21 = __VLS_asFunctionalComponent(__VLS_20, new __VLS_20(Object.assign({ 'onClick': {} }, { class: "delete-icon" })));
    const __VLS_22 = __VLS_21(Object.assign({ 'onClick': {} }, { class: "delete-icon" }), ...__VLS_functionalComponentArgsRest(__VLS_21));
    let __VLS_24;
    let __VLS_25;
    let __VLS_26;
    const __VLS_27 = {
        onClick: (...[$event]) => {
            __VLS_ctx.showDeleteConfirm(item);
        }
    };
    __VLS_23.slots.default;
    const __VLS_28 = {}.Delete;
    /** @type {[typeof __VLS_components.Delete, ]} */ ;
    // @ts-ignore
    const __VLS_29 = __VLS_asFunctionalComponent(__VLS_28, new __VLS_28({}));
    const __VLS_30 = __VLS_29({}, ...__VLS_functionalComponentArgsRest(__VLS_29));
    var __VLS_23;
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "history-date" }));
    (__VLS_ctx.formatDate(item.createAt));
}
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "chat-main" }));
const __VLS_32 = {}.ElCard;
/** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
// @ts-ignore
const __VLS_33 = __VLS_asFunctionalComponent(__VLS_32, new __VLS_32(Object.assign({ class: "qa-card" })));
const __VLS_34 = __VLS_33(Object.assign({ class: "qa-card" }), ...__VLS_functionalComponentArgsRest(__VLS_33));
__VLS_35.slots.default;
{
    const { header: __VLS_thisSlot } = __VLS_35.slots;
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "card-header" }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({});
}
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "chat-area" }));
for (const [message, index] of __VLS_getVForSourceType((__VLS_ctx.messages))) {
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ key: (index) }, { class: (['message', message.role]) }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "avatar" }));
    if (message.role === 'user') {
        __VLS_asFunctionalElement(__VLS_intrinsicElements.svg, __VLS_intrinsicElements.svg)({
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 24 24",
            fill: "#409eff",
        });
        __VLS_asFunctionalElement(__VLS_intrinsicElements.path)({
            d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",
        });
    }
    if (message.role === 'assistant') {
        __VLS_asFunctionalElement(__VLS_intrinsicElements.svg, __VLS_intrinsicElements.svg)({
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 24 24",
            fill: "#67c23a",
        });
        __VLS_asFunctionalElement(__VLS_intrinsicElements.path)({
            d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 12H7v-2h7v2zm3-4H7V9h10v2z",
        });
    }
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "message-content" }));
    (message.content);
}
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "input-area" }));
const __VLS_36 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
const __VLS_37 = __VLS_asFunctionalComponent(__VLS_36, new __VLS_36(Object.assign({ 'onKeyup': {} }, { modelValue: (__VLS_ctx.inputText), placeholder: "请输入您的问题...", clearable: true })));
const __VLS_38 = __VLS_37(Object.assign({ 'onKeyup': {} }, { modelValue: (__VLS_ctx.inputText), placeholder: "请输入您的问题...", clearable: true }), ...__VLS_functionalComponentArgsRest(__VLS_37));
let __VLS_40;
let __VLS_41;
let __VLS_42;
const __VLS_43 = {
    onKeyup: (__VLS_ctx.sendMessage)
};
var __VLS_39;
const __VLS_44 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
const __VLS_45 = __VLS_asFunctionalComponent(__VLS_44, new __VLS_44(Object.assign({ 'onClick': {} }, { type: "primary", loading: (__VLS_ctx.isLoading) })));
const __VLS_46 = __VLS_45(Object.assign({ 'onClick': {} }, { type: "primary", loading: (__VLS_ctx.isLoading) }), ...__VLS_functionalComponentArgsRest(__VLS_45));
let __VLS_48;
let __VLS_49;
let __VLS_50;
const __VLS_51 = {
    onClick: (__VLS_ctx.sendMessage)
};
__VLS_47.slots.default;
var __VLS_47;
var __VLS_35;
const __VLS_52 = {}.ElDialog;
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
// @ts-ignore
const __VLS_53 = __VLS_asFunctionalComponent(__VLS_52, new __VLS_52({
    modelValue: (__VLS_ctx.editDialogVisible),
    title: "修改标题",
    width: "30%",
}));
const __VLS_54 = __VLS_53({
    modelValue: (__VLS_ctx.editDialogVisible),
    title: "修改标题",
    width: "30%",
}, ...__VLS_functionalComponentArgsRest(__VLS_53));
__VLS_55.slots.default;
const __VLS_56 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
const __VLS_57 = __VLS_asFunctionalComponent(__VLS_56, new __VLS_56({
    modelValue: (__VLS_ctx.newTitle),
    placeholder: "请输入新标题",
}));
const __VLS_58 = __VLS_57({
    modelValue: (__VLS_ctx.newTitle),
    placeholder: "请输入新标题",
}, ...__VLS_functionalComponentArgsRest(__VLS_57));
{
    const { footer: __VLS_thisSlot } = __VLS_55.slots;
    __VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)(Object.assign({ class: "dialog-footer" }));
    const __VLS_60 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_61 = __VLS_asFunctionalComponent(__VLS_60, new __VLS_60(Object.assign({ 'onClick': {} })));
    const __VLS_62 = __VLS_61(Object.assign({ 'onClick': {} }), ...__VLS_functionalComponentArgsRest(__VLS_61));
    let __VLS_64;
    let __VLS_65;
    let __VLS_66;
    const __VLS_67 = {
        onClick: (...[$event]) => {
            __VLS_ctx.editDialogVisible = false;
        }
    };
    __VLS_63.slots.default;
    var __VLS_63;
    const __VLS_68 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_69 = __VLS_asFunctionalComponent(__VLS_68, new __VLS_68(Object.assign({ 'onClick': {} }, { type: "primary" })));
    const __VLS_70 = __VLS_69(Object.assign({ 'onClick': {} }, { type: "primary" }), ...__VLS_functionalComponentArgsRest(__VLS_69));
    let __VLS_72;
    let __VLS_73;
    let __VLS_74;
    const __VLS_75 = {
        onClick: (__VLS_ctx.confirmEditTitle)
    };
    __VLS_71.slots.default;
    var __VLS_71;
}
var __VLS_55;
/** @type {__VLS_StyleScopedClasses['qa-container']} */ ;
/** @type {__VLS_StyleScopedClasses['main-layout']} */ ;
/** @type {__VLS_StyleScopedClasses['history-sidebar']} */ ;
/** @type {__VLS_StyleScopedClasses['sidebar-header']} */ ;
/** @type {__VLS_StyleScopedClasses['history-list']} */ ;
/** @type {__VLS_StyleScopedClasses['history-item']} */ ;
/** @type {__VLS_StyleScopedClasses['active']} */ ;
/** @type {__VLS_StyleScopedClasses['history-title']} */ ;
/** @type {__VLS_StyleScopedClasses['history-actions']} */ ;
/** @type {__VLS_StyleScopedClasses['edit-icon']} */ ;
/** @type {__VLS_StyleScopedClasses['delete-icon']} */ ;
/** @type {__VLS_StyleScopedClasses['history-date']} */ ;
/** @type {__VLS_StyleScopedClasses['chat-main']} */ ;
/** @type {__VLS_StyleScopedClasses['qa-card']} */ ;
/** @type {__VLS_StyleScopedClasses['card-header']} */ ;
/** @type {__VLS_StyleScopedClasses['chat-area']} */ ;
/** @type {__VLS_StyleScopedClasses['message']} */ ;
/** @type {__VLS_StyleScopedClasses['avatar']} */ ;
/** @type {__VLS_StyleScopedClasses['message-content']} */ ;
/** @type {__VLS_StyleScopedClasses['input-area']} */ ;
/** @type {__VLS_StyleScopedClasses['dialog-footer']} */ ;
var __VLS_dollars;
const __VLS_self = (await Promise.resolve().then(() => __importStar(require('vue')))).defineComponent({
    setup() {
        return {
            Edit: icons_vue_1.Edit,
            Delete: icons_vue_1.Delete,
            messages: messages,
            inputText: inputText,
            isLoading: isLoading,
            historyList: historyList,
            selectedHistoryId: selectedHistoryId,
            editDialogVisible: editDialogVisible,
            newTitle: newTitle,
            isLoadingHistory: isLoadingHistory,
            refreshHistory: refreshHistory,
            loadHistory: loadHistory,
            formatDate: formatDate,
            showEditDialog: showEditDialog,
            showDeleteConfirm: showDeleteConfirm,
            confirmEditTitle: confirmEditTitle,
            sendMessage: sendMessage,
        };
    },
});
exports.default = (await Promise.resolve().then(() => __importStar(require('vue')))).defineComponent({
    setup() {
        return {};
    },
});
; /* PartiallyEnd: #4569/main.vue */
